package com.guli.order.feign;
/*
 * @Author 罗俊
 * @date 2020/11/18 - 4:00 下午
 *
 */

import com.guli.common.utils.R;
import com.guli.order.vo.MemberReceiveAddressVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(name = "member-service")
public interface MemberFeignClient {

    @GetMapping("/member/memberreceiveaddress/getMemberReceiveAddressByMemberId/{memberId}")
    @ApiOperation("根据会员id获取会员的收获地址")
    public List<MemberReceiveAddressVo> getMemberReceiveAddressByMemberId(@PathVariable("memberId") Long memberId);


    @GetMapping("/member/member/info/{id}")
    @ApiOperation("根据id获取Member")
    public R getUserInfo(@PathVariable("id") Long id);

    @GetMapping("/member/memberreceiveaddress/calculateCarriage/{memberReceiveAddressId}")
    @ApiOperation("根据收货地址id来计算运费")
    public R calculateCarriage(@PathVariable("memberReceiveAddressId")Long memberReceiveAddressId);
}